#include<stdlib.h>
#include<stdio.h>
#include<errno.h>
#include<string.h>

main( int argc, char * argv[] )
{

int * pt_i;
int * pt_j;
char * frase; /* puntero a caracteres */
int i=0;
size_t n;

pt_i = (int*)malloc( 1 * sizeof( int ) );

pt_j = (int*)malloc( 1 * sizeof( int ) );

frase = (char*)malloc( 15 * sizeof( char ));
i=40;
*pt_i =29;

printf( "(1) pt_i = %d\n",*pt_i );
pt_j =&i;
printf( "(1) pt_j = %d\n",*pt_j );
pt_j = pt_i;
*pt_i = 209;
printf( "(2) pt_i = %d\n",*pt_i );
printf( "(2) pt_j = %d\n",*pt_j );

strcpy( frase, "Esto es una frase" ); /* Asignación a cadena de caracteres */
n = strlen( frase );
printf( "(3) frase[%d] = %s\n",n,frase );
printf( "(4) primera letra es = %c\n", *frase );
frase = frase + 14;
printf( "(5) segunda letra es = %c\n", *frase );
free( pt_i ); /* free - libera memoria dinámica */
return 0;
} /* main */

